package pers.cj.pdos.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 当每次进货、进货入库、组装拆卸、组装拆卸入库时，商品成本表 就增加对应商品的总数量和总金额，计算成本价；当每次进货、进货
 * </p>
 *
 * @author chenj
 * @since 2020-03-06
 */
public class GoodsCost extends Model<GoodsCost> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private String id;

    /**
     * 商品id
     */
    private String goodsId;

    /**
     * 入库总数量
     */
    private BigDecimal number;

    /**
     * 入库总金额
     */
    private BigDecimal totalAmount;

    /**
     * 成本价
     */
    private BigDecimal cost;

    /**
     * 所属公司id
     */
    private String companyId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }
    public BigDecimal getNumber() {
        return number;
    }

    public void setNumber(BigDecimal number) {
        this.number = number;
    }
    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }
    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }
    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "GoodsCost{" +
            "id=" + id +
            ", goodsId=" + goodsId +
            ", number=" + number +
            ", totalAmount=" + totalAmount +
            ", cost=" + cost +
            ", companyId=" + companyId +
        "}";
    }
}
